﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace parkMonitor.viewModel {
	/// <summary>设备菜单项ViewModel</summary>
	public class DevMenuItemVMCtl : INotifyPropertyChanged {
		//号牌机
		ObservableCollection<DevMenuItemVM> _NumMachine = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> NumMachine {
			get { return _NumMachine; }
			set { _NumMachine = value; FirePropertyChanged("NumMachine"); }
		}

		//激光雷达
		ObservableCollection<DevMenuItemVM> _Laser = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> Laser {
			get { return _Laser; }
			set { _Laser = value; FirePropertyChanged("Laser"); }
		}

		//托盘
		ObservableCollection<DevMenuItemVM> _Tray = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> Tray {
			get { return _Tray; }
			set { _Tray = value; FirePropertyChanged("Tray"); }
		}

		//机械手
		ObservableCollection<DevMenuItemVM> _Robot = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> Robot {
			get { return _Robot; }
			set { _Robot = value; FirePropertyChanged("Robot"); }
		}

		//光栅
		ObservableCollection<DevMenuItemVM> _Raster = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> Raster {
			get { return _Raster; }
			set { _Raster = value; FirePropertyChanged("Raster"); }
		}

		//超声波
		ObservableCollection<DevMenuItemVM> _Ultrasonic = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> Ultrasonic {
			get { return _Ultrasonic; }
			set { _Ultrasonic = value; FirePropertyChanged("Ultrasonic"); }
		}

		//传感器
		ObservableCollection<DevMenuItemVM> _Sensor = new ObservableCollection<DevMenuItemVM>();
		public ObservableCollection<DevMenuItemVM> Sensor {
			get { return _Sensor; }
			set { _Sensor = value; FirePropertyChanged("Sensor"); }
		}

		public virtual event PropertyChangedEventHandler PropertyChanged;
		public virtual void FirePropertyChanged(string propertyName) {
			if(PropertyChanged != null) {
				PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
